package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

/**
 * 商品
 */
@Table(name = "sys_product")
public class Product extends BaseEntity{

    /**
     * 商品名称
     */
    @Column(length = 20)
    private String name;

    @Column(length = 19)
    private Long companyId;

    /**
     * 商品编码
     */
    @Column(length = 20)
    private String code;

    /**
     * 商品条码
     */
    @Column(length = 20)
    private String barcode;

    /**
     * 商品分类
     */
    @Column(length = 19)
    private Long productTypeId;

    /**
     * 规格型号
     */
    @Column(length = 20)
    private String model;

    /**
     * 计量单位
     */
    @Column(length = 19)
    private Long unitId;

    /**
     * 进货价
     */
    @Column(length = 19)
    private Long purchasePrice;

    /**
     * 售价
     */
    @Column(length = 19)
    private Long salePrice;

    /**
     * 最新进货价
     */
    @Column(length = 19)
    private Long lastPurchasePrice;

    /**
     * 最新售价
     */
    @Column(length = 19)
    private Long lastSalePrice;

    /**
     * 是否启用批次管理
     */
    @Column(length = 11)
    private Integer enableBatch;

    /**
     * 是否启用保质期管理
     */
    @Column(length = 11)
    private Integer enableFine;

    /**
     * 是否启用库存预警
     */
    @Column(length = 11)
    private Integer enableStore;

    /**
     * 保质期天数
     */
    @Column(length = 11)
    private Integer fineDays;

    /**
     * 预警天数
     */
    @Column(length = 11)
    private Integer warnDays;

    /**
     * 低库存预警数量
     */
    @Column(length = 11)
    private Integer storeMin;

    /**
     * 高库存预警数量
     */
    @Column(length = 11)
    private Integer storeMax;

    /**
     * 备注
     */
    @Column(length = 30)
    private String comments;

    @Validate
    private Long createUserId;

    @Validate
    private Long createTime;

    @Validate(insert=false,update=true)
    private Long updateUserId;

    @Validate(insert=false,update=true)
    private Long updateTime;

    public Long getLastPurchasePrice() {
        return lastPurchasePrice;
    }

    public void setLastPurchasePrice(Long lastPurchasePrice) {
        this.lastPurchasePrice = lastPurchasePrice;
    }

    public Long getLastSalePrice() {
        return lastSalePrice;
    }

    public void setLastSalePrice(Long lastSalePrice) {
        this.lastSalePrice = lastSalePrice;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getProductTypeId() {
        return productTypeId;
    }

    public void setProductTypeId(Long productTypeId) {
        this.productTypeId = productTypeId;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public Long getPurchasePrice() {
        return purchasePrice;
    }

    public void setPurchasePrice(Long purchasePrice) {
        this.purchasePrice = purchasePrice;
    }

    public Long getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(Long salePrice) {
        this.salePrice = salePrice;
    }

    public Integer getEnableBatch() {
        return enableBatch;
    }

    public void setEnableBatch(Integer enableBatch) {
        this.enableBatch = enableBatch;
    }

    public Integer getEnableFine() {
        return enableFine;
    }

    public void setEnableFine(Integer enableFine) {
        this.enableFine = enableFine;
    }

    public Integer getEnableStore() {
        return enableStore;
    }

    public void setEnableStore(Integer enableStore) {
        this.enableStore = enableStore;
    }

    public Integer getFineDays() {
        return fineDays;
    }

    public void setFineDays(Integer fineDays) {
        this.fineDays = fineDays;
    }

    public Integer getWarnDays() {
        return warnDays;
    }

    public void setWarnDays(Integer warnDays) {
        this.warnDays = warnDays;
    }

    public Integer getStoreMin() {
        return storeMin;
    }

    public void setStoreMin(Integer storeMin) {
        this.storeMin = storeMin;
    }

    public Integer getStoreMax() {
        return storeMax;
    }

    public void setStoreMax(Integer storeMax) {
        this.storeMax = storeMax;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }
}
